package com.test.p20mediator.example01;

import java.util.HashMap;
import java.util.Map;

public class President implements  Mediator {

    private Map<String,Department> map = new HashMap<String,Department>();

    @Override
    public void register(String dname, Department department) {
        map.put(dname,department);
    }

    @Override
    public void command(String dname) {
        map.get(dname).selfAction();
    }
}
